import ThemeContext from "@/utils/ThemeContext";
import { Button } from "antd";
export default function MainChild() {
	return (
		<ThemeContext.Consumer>
			{
				(value) => {
					console.log(value)
					return (
						<div style={{ marginTop: '20px' }}>
							<span>我是Main的子组件</span>
							<span>支持人数：{value.count}</span>
							<span>反对人数：{value.oppose}</span>
							<Button onClick={value.handleCount} style={{ marginRight: '10px' }}>支持</Button>
							<Button onClick={value.handleOppose} style={{ marginRight: '10px' }}>反对</Button>
						</div>
					)
				}
			}
		</ThemeContext.Consumer>
	)
}
